package java101;


import org.junit.Test;

import junit.framework.TestCase;

public class GeoPoint2Test extends TestCase {

public void testGeoPoint2() {
	GeoPoint2 equatepm = new GeoPoint2 (0.,0.);
//	assertEquals(0., primemeridian.getDegLon());
	Longitude quarter = new Longitude(90.);
	assertEquals(90., quarter.getDegLon());	
	Longitude half = new Longitude(-180.);
	assertEquals(-180., half.getDegLon());	
}
	
public void testOutOfRange() {
	try {
		Longitude OutOfRangeMin = new Longitude(-180.1);
		fail("Should have thrown exception");
	} catch (IllegalArgumentException e) {
		//passed
	}
	try {
		Longitude OutOfRangeMax = new Longitude(180.1);
		fail("Should have thrown exception");
	} catch (IllegalArgumentException e) {
		//passed
	}
}
}
	

